<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>ToastSkin.mxml</title>
<link rel="stylesheet" type="text/css" href="../../../../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>

<span class="MXMLASDoc">&lt;!---</span><span class="MXMLASDoc"> The default skin class for a Spark Toast container.  

    @see spark.components.Toast
    
    @langversion 3.0
    @playerversion Flash 10
    @playerversion AIR 2.5
    @productversion Flex 4.5
</span><span class="MXMLASDoc">--&gt;</span>
<span class="MXMLComponent_Tag">&lt;s:Skin</span><span class="MXMLDefault_Text"> xmlns:fx="</span><span class="MXMLString">http://ns.adobe.com/mxml/2009</span><span class="MXMLDefault_Text">" xmlns:s="</span><span class="MXMLString">library://ns.adobe.com/flex/spark</span><span class="MXMLDefault_Text">" 
        xmlns:fb="</span><span class="MXMLString">http://ns.adobe.com/flashbuilder/2009</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;fx:Metadata&gt;</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptMetadata">HostComponent</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"spark.components.Toast"</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">]</span><span class="MXMLSpecial_Tag">&lt;/fx:Metadata&gt;</span>
    
    <span class="MXMLSpecial_Tag">&lt;fx:Script&gt;</span>
        &lt;![CDATA[
            
            <span class="ActionScriptReserved">override</span> <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">initializationComplete</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">super</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">initializationComplete</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
                
                <span class="ActionScriptDefault_Text">labelDisplay</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">styleName</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">this</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">override</span> <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">updateDisplayList</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">unscaledWidth</span>:<span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">unscaledHeight</span>:<span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// set our styles
</span>                <span class="ActionScriptDefault_Text">background</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">radiusX</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"cornerRadius"</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">background</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">radiusY</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"cornerRadius"</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">bgRectFill</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"contentBackgroundColor"</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">bgRectFill</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">alpha</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"contentBackgroundAlpha"</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">bgRectStroke</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"strokeColor"</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">bgRectStroke</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">alpha</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getStyle</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">"strokeAlpha"</span><span class="ActionScriptBracket/Brace">)</span>;
                        
                <span class="ActionScriptReserved">super</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">updateDisplayList</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">unscaledWidth</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">unscaledHeight</span><span class="ActionScriptBracket/Brace">)</span>;
                
                <span class="ActionScriptComment">// center this in its host and push it up from the bottom edge
</span>                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">notificationParentGlobalPt</span>:<span class="ActionScriptDefault_Text">Point</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">hostComponent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">notificationParent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">localToGlobal</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Point</span><span class="ActionScriptBracket/Brace">(</span>0<span class="ActionScriptOperator">,</span> 0<span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">posX</span>:<span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">notificationParentGlobalPt</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">x</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">hostComponent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">notificationParent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">width</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">unscaledWidth</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">/</span> 2;
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">posY</span>:<span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">notificationParentGlobalPt</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">y</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">hostComponent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">notificationParent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">height</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">unscaledHeight</span> <span class="ActionScriptOperator">-</span> 25;
                
                <span class="ActionScriptDefault_Text">move</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">posX</span><span class="ActionScriptOperator">,</span> <span class="ActionScriptDefault_Text">posY</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">override</span> <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">measure</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">super</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">measure</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
                
                <span class="ActionScriptComment">// keep the toast 20 pixels from the edge of our host
</span>                <span class="ActionScriptDefault_Text">maxWidth</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">hostComponent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">notificationParent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">width</span> <span class="ActionScriptOperator">-</span> 20 <span class="ActionScriptOperator">*</span> 2;                
            <span class="ActionScriptBracket/Brace">}</span>
            
        <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/fx:Script&gt;</span>
    
    <span class="MXMLComponent_Tag">&lt;s:states&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:State</span><span class="MXMLDefault_Text"> name="</span><span class="MXMLString">normal</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:State</span><span class="MXMLDefault_Text"> name="</span><span class="MXMLString">disabled</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:State</span><span class="MXMLDefault_Text"> name="</span><span class="MXMLString">closed</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/s:states&gt;</span>
    
    <span class="MXMLASDoc">&lt;!---</span><span class="MXMLASDoc"> Defines the background and content group used by this skin. </span><span class="MXMLASDoc">--&gt;</span>
    <span class="MXMLComponent_Tag">&lt;s:Group</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">chrome</span><span class="MXMLDefault_Text">" left="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" right="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" top="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" bottom="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">&gt;</span>

        <span class="MXMLASDoc">&lt;!---</span><span class="MXMLASDoc"> Defines the appearance of the Toast's background. </span><span class="MXMLASDoc">--&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:Rect</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">background</span><span class="MXMLDefault_Text">" left="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" right="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" top="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" bottom="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:fill&gt;</span>
                <span class="MXMLComponent_Tag">&lt;s:SolidColor</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">bgRectFill</span><span class="MXMLDefault_Text">" color="</span><span class="MXMLString">#000000</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;/s:fill&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:stroke&gt;</span>
                <span class="MXMLComponent_Tag">&lt;s:SolidColorStroke</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">bgRectStroke</span><span class="MXMLDefault_Text">" color="</span><span class="MXMLString">#FFFFFF</span><span class="MXMLDefault_Text">" alpha="</span><span class="MXMLString">0.65</span><span class="MXMLDefault_Text">" weight="</span><span class="MXMLString">2</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">/&gt;</span> 
            <span class="MXMLComponent_Tag">&lt;/s:stroke&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/s:Rect&gt;</span>
        
        <span class="MXMLASDoc">&lt;!---</span><span class="MXMLASDoc"> @copy spark.components.SkinnableContainer#contentGroup </span><span class="MXMLASDoc">--&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:Group</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">contentGroup</span><span class="MXMLDefault_Text">" left="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" right="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" top="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" bottom="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:layout&gt;</span>
                <span class="MXMLComponent_Tag">&lt;s:BasicLayout/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;/s:layout&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:Label</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">labelDisplay</span><span class="MXMLDefault_Text">" left="</span><span class="MXMLString">12</span><span class="MXMLDefault_Text">" right="</span><span class="MXMLString">12</span><span class="MXMLDefault_Text">" top="</span><span class="MXMLString">8</span><span class="MXMLDefault_Text">" bottom="</span><span class="MXMLString">8</span><span class="MXMLDefault_Text">" 
                     text="</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">hostComponent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">label</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">" backgroundAlpha="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">" </span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/s:Group&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/s:Group&gt;</span>
    
<span class="MXMLComponent_Tag">&lt;/s:Skin&gt;</span></pre></body>
</html>
